import request from '@/utils/request'

import mockRequest from '@/mock/mockAjax'

// 获取用户地址列表
export function getAddress(userid) {
    return mockRequest({
        url: '/member/userAddress',
        method: 'get',
        params: {userid},
        headers: {
            "Content-Type":"multipart/form-data"
        }
    })
}

// 添加用户地址
export function addAddress(params) {
    return request({
        url: '/adress/addAdress',
        method: 'post',
        data: params
    })
}

// 删除用户地址
export function deleteAddress(params) {
    return request({
        url: '/adress/deleteAdress',
        method: 'post',
        data: params
    })
}

// 修改用户地址
export function updateAddress(params) {
    return request({
        url: '/adress/updateAdress',
        method: 'post',
        data: params
    })
}
